package com.starbaba.core.web.struts2;

import java.io.Serializable;

import net.sf.json.JSONObject;

@SuppressWarnings("serial")
public class JsonResult implements Serializable{
	
	protected String status;
	protected String message;
	
	public JsonResult() {
	}

	public JsonResult(String status, String message) {
		this.status = status;
		this.message = message;
	}
	
	public JsonResult(String status) {
		this.status = status;
	}

	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	
	public String getJsonString(){
		JSONObject jsonObject =  new JSONObject();
		jsonObject.put("status", this.getStatus());
		jsonObject.put("message", this.getMessage());
		return jsonObject.toString();
	}
	
}
